﻿/*
 * @Autor: PK
 * @Date: 2021/12/28 16:13:SS
 */

using System.ComponentModel;
using ShkSimulation.core.dao.statistic;

namespace ShkSimulation.desktop.component.tools {

	public class DataReporterPropertyBindingList: BindingList<string> {

		public void Bind(DataReporterCollection reporters) {
			Clear();
			if (reporters == null) {
				return;
			}
			var template = reporters.Template;
			foreach (var doubleUniqueKey in template.DoubleUniqueKeys) {
				Add($"Double:{doubleUniqueKey}");
			}
			foreach (var hourCounterUniqueKey in template.HourCounterUniqueKeys) {
				Add($"Hc:{hourCounterUniqueKey}");
			}
			if (Count == 0) {
				Add("空");
			}
		}

	}

}